//
//  DateMethod.h
//  E-Publishing
//
//  Created by zhangqing on 12-8-1.
//  Copyright (c) 2012年 __MyCompanyName__. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface DateMethod : NSObject

+(NSDate *)getBeijingDate;

+(NSString *)timestampFromString:(NSDate *)date;

//将日期格式转化为字符串
+ (NSString *)changeDateToString:(NSDate *)date;

//将字符串转化为日期格式
+ (NSDate *)changeStringToDate:(NSString *)aString;

//将时间格式转化为字符串
+ (NSString *)changeDateTimeToString:(NSDate *)date;

+ (NSString *)changeDateToMMddTimeToString:(NSDate *)date;

+ (NSString *)changeDateTohhmmString:(NSDate *)date;

//将日期格式转化为字符串
+ (NSString *)changeDateTimeToStringTimeFirst:(NSDate *)date;

//将字符串转化为时间格式
+ (NSDate *)changeStringToDateTime:(NSString *)aString;

//将时间戳转化为时分秒
+ (NSString *)changeTimeToHourMinSec:(double)dtime;

//将一个日期转换成今年的月-日 格式信息
+ (NSDate *)changeSignalDateToNowYear:(NSDate *)date;

//获得当前的年月
+ (NSString *)getCurrentYearAndMonthString;

//将日期转换成中文表达方式
+ (NSString *)changeDateToChiniseMonthDayString:(NSDate *)date;

//将秒数转换成电子表形式时间
+ (NSString *)changeTimeToDigitalTimeString:(double)dtime;

+ (NSDate *)changeTimeToDate:(double)dtime;

//传入时间戳 返回星期几  0123456
+ (int)backWeekNumWithTimes:(double)dtime;

//将当前日期转换为当天0点的时间戳
+ (double)backDayZeroTimeWithDate:(NSDate*)_date;

//比较选择的时间戳是否大于当前时间
+ (BOOL)compareDateWithChooseTimes:(double)dtime;

//比较选择的时间戳是否大于当前时间
+ (BOOL)compareDateWithChooseDate:(NSDate *)_date;

//返回当前年份
+ (int )yearWithDate:(NSDate *)_date;

@end
